{include file="admin/header.tpl" title="header" }
<script src="{$baseurl}/javascript/daily_sale.js"></script>

<div id="content">
      {php} echo display_msg(); {/php}
      <h2>Expenses Listing</h2>
      
       
       <div><img src="{$admin_imgurl}/spacer.gif" width="1" height="25" alt="spacer" /></div>
      
      <div>
      	<div class="admorep" align="right"><a href="{$baseurl}/admin/expense.php?action=add">Add Expense</a></div>
        
        <form name="expense_list_form" id="expense_list_form" action="{$baseurl}/admin/expense.php" method="post">
        	<input type="hidden" name="action" value="update_order"  />
        
        <table cellspacing="0" cellpadding="0" class="engineTable">
          <thead>
            <tr >
              <th width="3%" align="center" valign="top" nowrap="nowrap" > Sr. No</th>
              <th width="70%" nowrap="nowrap" align="left" valign="top">Eempresa Nombre</th>
              <th width="10%" align="center" valign="top">Order {if $expenses|@count gt 0} <a class="saveorder" href="javascript:document.expense_list_form.submit();"></a>{/if}</th>
              <th width="12%" align="center" valign="top" colspan="3">Actions</th>
            </tr>
          </thead>
          <tbody>
        {assign var='counter' value=$pagination_start}
       	{foreach from=$expenses item=row}
            {assign var='counter' value=$counter+1}     
            <tr class="{cycle values="even,odd"}">
              <td align="center" valign="middle">{$counter}</td>
              <td align="left" valign="middle">{$row.expense_name}</td>
               <td align="center" valign="top"> 
              		<input class="order_txt" type="text" name="expense_ordering[]" value="{$row.expense_ordering}" style="width:25px" maxlength="4"  /> 
                    <input type="hidden" name="expense_ids[]" value="{$row.expense_id}"  /> 
              </td>
           	  <td align="center" valign="middle">
              	<a title="Edit" href="{$baseurl}/admin/expense.php?action=edit&expense_id={$row.expense_id}"> <img src="{$admin_imgurl}/edit.png"/> </a> 
               </td>
              <td align="center" valign="middle">
              	<a title="Delete" href="{$baseurl}/admin/expense.php?action=delete&expense_id={$row.expense_id}" onClick="return confirm('Are You Sure To Delete?')"><img src="{$admin_imgurl}/del.png"  /> </a>
               </td>
			</tr>
        {foreachelse}
        	
            
           <tr><td colspan="6" align="center"> No Record Found </td></tr>
        {/foreach}
          </tbody>
        </table>
        </form>
        
      </div>
    </div>
      {include file="admin/footer.tpl" title="footer"}   